package com.example.pipeline.base;

import com.example.pipeline.dto.BasicResultVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author code威
 * @version 1.0
 * @description: 责任链的上下文
 * @date 2022/9/18 16:46
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProcessContext<T extends ProcessModel> {

    /**
     * 标识责任链的code
     */
    private String code;

    /**
     * 储存责任链的上下文数据
     */
    private T ProcessModel;


    /**
     * 责任链是否需要中断标识
     */
    private Boolean needBreak;

    /**
     * 责任链返回结果
     */
    private BasicResultVO response;
}
